package com.code.user.model.po;

import com.code.commons.model.po.BasePO;
import com.code.commons.validator.IsEmail;
import com.code.commons.validator.IsMobile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;

/**
 * 帮助与反馈PO及持久层对象
 *
 * @author tangyifei
 * @since 2019年12月26日09:36:20
 */
@ApiModel("帮助与反馈PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class HelpFeedback extends BasePO<Long> {

    private static final long serialVersionUID = 4503271237190360772L;

    @ApiModelProperty(value = "帮助与反馈主键", example = "1")
    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;

    @ApiModelProperty(value = "添加人主键", example = "1")
//    @NotBlank(message = "添加人主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "添加人姓名", example = "1")
//    @Length(min = 1, max = 100)
    private String name;

    @ApiModelProperty(value = "手机号", example = "+86150****0055")
//    @NotBlank(message = "手机号不能为空")
    @IsMobile(required = false)
    private String phone;

    @ApiModelProperty(value = "邮件", example = "***@163.com")
    @IsEmail(required = false)
    private String email;

    @ApiModelProperty(value = "帮助与反馈的内容", example = "提币太麻烦")
    @NotBlank(message = "帮助与反馈的内容不能为空")
    private String content;

}
